import React from "react"
import CheckBox, { CheckBoxProps } from "@react-native-community/checkbox"
import { StyleSheet } from "react-native"
import { scale } from "react-native-size-matters"
import { colors } from "app/theme"

type CheckBoxProp = CheckBoxProps

const CheckBoxComponent = ({ value, onValueChange, disabled }: CheckBoxProp) => {
  return (
    <CheckBox
      style={styles.checkBox}
      onFillColor="transparent"
      onCheckColor={colors.brown}
      onTintColor={colors.brown}
      disabled={disabled}
      boxType={"square"}
      value={value}
      onValueChange={onValueChange}
      //@ts-ignore
      tintColors={colors.black}
      lineWidth={1}
    />
  )
}

export default CheckBoxComponent
const styles = StyleSheet.create({
  checkBox: {
    height: scale(20),
    width: scale(20),
  },
})
